package com.ib.service.impl;

import com.ib.dao.AccountDao;
import com.ib.dao.UserDao;
import com.ib.model.Account;
import com.ib.model.User;
import com.ib.service.*;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Service;

import javax.jws.WebService;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * Implementation of UserManager interface.
 *
 * @author <a href="mailto:matt@raibledesigns.com">Matt Raible</a>
 */
@Service("accountManager")
public class AccountManagerImpl extends GenericManagerImpl<Account, Long> implements AccountManager {
    private AccountDao accountDao;


    public AccountManagerImpl(AccountDao accountDao) {
        super(accountDao);
        this.accountDao = accountDao;
    }

    public List<Account> findByAccountType(String accountType) {
        return accountDao.findByAccountType(accountType);
    }
}
